package org.shopen.ai.puremvc.controller.domain
{
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	import org.shopen.ai.puremvc.ApplicationConstants;
	import org.shopen.ai.puremvc.model.problem.IState;
	import org.shopen.ai.puremvc.model.problem.cities.CitiesProblemProxy;
	import org.un.cava.birdeye.ravis.graphLayout.data.INode;

	public class HandleCitySelectedCommand extends SimpleCommand
	{
		override public function execute(notification:INotification):void
		{
			var node : INode = notification.getBody() as INode;
			var proxy : CitiesProblemProxy = facade.retrieveProxy(CitiesProblemProxy.NAME) as CitiesProblemProxy;
			var state : IState = proxy.createState(node);
			sendNotification(ApplicationConstants.PROBLEMSTATE_SELECTED, state, notification.getType());
		}		
	}
}